//
//  MSSaleFilterTableVC.m
//  SocietySale
//
//  Created by Mike on 16/11/7.
//  Copyright © 2016年 Mike. All rights reserved.
//

#import "MSSaleFilterTableVC.h"

@interface MSSaleFilterTableVC ()

@end

@implementation MSSaleFilterTableVC

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *cellId = @"cellId";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        
        UIView *horizonLineView =[[UIView alloc] initWithFrame:CGRectMake(12, 44-0.6, SCREEN_WIDTH-24, 0.6)];
        horizonLineView.tag = 100+indexPath.row;
        horizonLineView.backgroundColor = kNormalGray;
        [cell.contentView addSubview:horizonLineView];
    }
//    for (NSDictionary *dict in self.dataArray) {
//        if ([dict isKindOfClass:[NSDictionary class]]) {
//            cell.textLabel.text = [HDUtil check:dict[@"name"]];
//        }
//    }
    cell.textLabel.text = self.dataArray[indexPath.row];
    cell.textLabel.font = HeitiFont(15);
    cell.textLabel.textColor = [self.stateArray[indexPath.row] isEqualToString:@"YES"]?kBlueColor:kLightBlackColor;
    
    UIView *horizonLineView = [cell viewWithTag:100+indexPath.row];
    if (indexPath.row == [self.dataArray count] -1) {
        horizonLineView.hidden = YES;
    }
    else{
        horizonLineView.hidden = NO;
    }
    return cell;
}

@end
